import React, { Suspense } from 'react'
import { useRoutes } from 'react-router-dom'
import routes from './router'
import Header from '@/components/app-header'
import Footer from '@/components/app-footer'

const App: React.FC = () => {
    return (
        <div className="App">
            <Header></Header>
            <Suspense fallback="">
                <div className="main">{useRoutes(routes)}</div>
            </Suspense>
            <Footer></Footer>
        </div>
    )
}

export default App
